<div class="divupdate">
    <div class="notice" style="display: none"></div>        
    <form id="resource_add_form">
    <table class="">
        <thead>
        <th colspan="6">
            <h4>Resource</h4>
        </th>
        </thead>
        <tbody>
            <tr>
                <td><label for="name">Name</label></td>
                <td>
                    <input id="id" name="id" type="hidden" value="<?php echo (isset($this->data) ? $this->data['resID'] : '');?>"/>
                    <input id="name" class="col_9" name="name" type="text" value="<?php echo (isset($this->data) ? $this->data['name'] : '');?>" placeholder="Resource name"/>
                </td>
                    </tr>
                    <tr>
                        <td><label for="category">Family</label></td>
                        <td><select id="category" class="col_5" name="category" style="width: 100px">                                
                            <?php foreach ($this->category as $value) {
                                    echo $value;
                                } ?>
                            </select>
                            </td>
                            </tr >
                            <tr>
                            <td valign="top"><label for="desc">Description</label></td>
                            <td><textarea id="desc" class="col_9" name="desc" cols="80" placeholder="Description"><?php echo (isset($this->data) ? $this->data['description'] : '');?></textarea></td>
                        </tr>
                    <tr>
                    <td><label for="resource_url">URL </label></td>
                    <td><input id="resource_url" class="col_9" name="resource_url" type="text" value="<?php echo (isset($this->data) ? $this->data['resource_url'] : '');?>" placeholder="url"/></td>
                </tr>                
            <tr>
            <td valign="top"><label for="name">Example </label></td>
            <td><textarea id="example" name="example" class="col_9" placeholder="Example"><?php echo (isset($this->data) ? $this->data['example'] : '');?></textarea>
            <input id="metaflag" name="metaflag" type="hidden" value=""/></td>
        </tr>
        <tr>
                    <td><label for="tags">Tags </label></td>
                    <td><input id="tags" class="col_9" name="tags" type="text" value="<?php echo (isset($this->data) ? $this->data['tags'] : '');?>" placeholder="tags"/></td>
                </tr>
        <tr class="res_meta">
            <th colspan="6" style="text-align: left">
                <h5>Resource Information</h5>                
            </th>
        </tr>
        <tr class="res_meta">
                    <td><label for="api_version">Resource (API) Version </label></td>
                    <td><input id="api_version" class="col_9" name="api_version" type="text" value="<?php echo (isset($this->data) ? $this->data['api_version'] : '');?>" placeholder="api version (e.g 1.0, 2.0, etc)"/></td>
                </tr>
        <tr class="res_meta">
                    <td><label for="httpmethod">HTTP Methods </label></td>
                    <td><input id="resource_url" class="col_9" name="http_method" type="text" value="<?php echo (isset($this->data) ? $this->data['http_method'] : '');?>" placeholder="httpd method (e.g. POST, GET, etc)"/></td>
                </tr>
        <tr class="res_meta">
            <td><label for="auth">Authentication</label></td>
            <td><input id="auth" class="col_9" name="auth" type="text" value="<?php echo (isset($this->data) ? $this->data['auth'] : '');?>" placeholder="authentication (e.g Yes, No)"/></td>
        </tr>
        <tr class="res_meta">
            <td><label for="response_fmt">Response Format</label></td>
            <td><input id="response" class="col_9" name="response_fmt" type="text" value="<?php echo (isset($this->data) ? $this->data['response_fmt'] : '');?>" placeholder="response format (e.g JSON, XML, HTML, etc)"/></td>
        </tr>
        <tr>
            <td colspan="2">
                <button id="save-btn" class="green" onclick="Web.Do({formid: '#resource_add_form', param: {type: 'save'}});"> Save </button> &nbsp; 
                <button id="meta-btn" class="blue"> Add Meta </button> &nbsp;
                <button id="cancel-btn" onclick="Web.Do({formid: '#resource_add_form', param: {type: 'cancel'}});"> Cancel </button>
            </td>
        </tr>
        </tbody>
        <tfoot>

        </tfoot>
    </table>  
    </form>
</div>